<template>
  <div>
    <el-container>
      <el-header>后台管理系统</el-header>
      <el-container>
        <!-- 侧边导航菜单 -->
        <el-aside width="200px">
          <el-menu class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" router>
            <el-submenu>
              <template slot="title">
                <span>课程管理</span>
              </template>
              <el-menu-item index="/admin/addCourse">增加课程</el-menu-item>
              <el-menu-item index="/admin/updateCourse">修改课程</el-menu-item>

            </el-submenu>
            <el-menu-item index="/admin/comment">
              <span slot="title">评论管理</span>
            </el-menu-item>
            <el-menu-item index="/admin/user">
              <span slot="title">用户管理</span>
            </el-menu-item>
          </el-menu>
        </el-aside>
        <!-- 内容 -->
        <el-main>

          <router-view></router-view>

        </el-main>
      </el-container>
    </el-container>

  </div>
</template>


<script>
export default {
  data() {
    return {
    };
  },
  methods: {
    handleSelect(key, keyPath) {
      console.log(key, keyPath);
    }
  }
}
</script>

<style scoped>
.el-aside::-webkit-scrollbar {
  display: none;
}

.el-menu-vertical-demo{
  height: 100%;
}

.el-header {
  background-color: #B3C0D1;
  color: #333;
  text-align: center;
  line-height: 60px;
}
</style>